package com.xyz.testng;

import org.testng.annotations.*;

/**
 * @author: shanghongfan
 * @Date: 2020/8/29 00:10
 * @Description:基本注解
 */
public class BasicAnnotation {

    @Test
    public void testCase1() {
        System.out.println("测试用例1");
    }

    @Test
    public void testCase2() {
        System.out.println("测试用例2");
    }

    @BeforeMethod
    public void beforeMethod() {
        System.out.println("测试方法之前运行");
    }

    @AfterMethod
    public void afterMethod() {
        System.out.println("测试方法之后运行");
    }

    @BeforeClass
    public void beforeClass() {
        System.out.println("beforeClass在类运行之前运行");
    }

    @AfterClass
    public void afterClass() {
        System.out.println("afterClass在类运行之后运行");
    }

    @BeforeSuite
    public void beforeSuite() {
        System.out.println("beforeSuite在类之前运行,早于beforeClass");
    }

    @AfterSuite
    public void afterSuite() {
        System.out.println("afterSuite在类之后运行,晚于afterClass");
    }

}
